﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Extensions.DependencyInjection;

using Xc.DataAccess.Processes;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class ApplicationExtension
    {
        /// <summary>
        /// 添加windows 服务管理
        /// <list type="number">
        /// <item>windows服务管理 <see cref="IWindowsServiceManager"/> </item>
        /// </list>
        /// </summary>
        /// <param name="serviceDescriptors"></param>
        /// <returns></returns>
        public static IServiceCollection AddWindowServiceManager(this IServiceCollection serviceDescriptors)
        {
            serviceDescriptors.AddTransient<IWindowsServiceManager, WindowsServiceManager>();
            return serviceDescriptors;
        }
    }
}
